package cn.id68.www.http.builder;

import java.io.File;

import cn.id68.www.http.RequestCall;
import cn.id68.www.http.request.PostFileRequest;
import okhttp3.MediaType;

/**
 * Created by Administrator on 2017/3/21.
 */
public class PostFileBuilder extends OkHttpRequestBuilder<PostFileBuilder> {

    private File file;
    private MediaType mediaType;

    public OkHttpRequestBuilder file(File file){
        this.file = file;
        return this;
    }

    public OkHttpRequestBuilder mediaType(MediaType mediaType){
        this.mediaType = mediaType;
        return this;
    }

    @Override
    public RequestCall build() {
        return new PostFileRequest(url,tag,params,headers,id,file,mediaType).build();
    }
}
